<br />
<script type = "text/javascript">
	jQuery(function() {
		jQuery("#filterName").keyup(function(){
			jQuery("table tbody tr")
				.hide()
				.filter(":contains('"+(jQuery(this).val() )+"')")
				.show();
		}).keyup();
	});

</script>
<p class='text-center lead'>{title}</p>

<script language="JavaScript" type="text/javascript" src="http://<?php echo base_url(); ?>assets/JS/jquery.tablesorter.js"></script>

<br>
<form class="form-horizontal" role="form">
	<div class="form-group">
		<label for="name" class="col-md-2 control-label">全字段筛选：</label>
		<div class="col-md-2">
			<input type = "text"  class="form-control" name = "name" id = "filterName" />
		</div>
	</div>
</form>


<table class='table table-striped table-bordered' id = 'mytable'>
	<thead>
	<tr  class="info">
	<th><strong>负责人</strong></th>
	<th><strong>客户名</strong></th>
	<th><strong>范围</strong></th>
	<th><strong>最近两次联系</strong></th>
	<th><strong>操作</strong></th>
	</tr>
	</thead>
	
	<tbody>
	{clients}
		<tr>
		<td>{contact_by}</td>
		<td>{name}</td>
		<td class="col-md-6">{scope}</td>
		<td><p>{cd1}&nbsp{status1}</p> <p>{cd2}&nbsp{status2}</p></td>
		<td>
			<a class='btn btn-success btn-sm' href='http://<?php echo base_url(); ?>index.php/client/edit/{id}' role='button'>编辑</a>
			<a class='btn btn-success btn-sm' href='http://<?php echo base_url(); ?>index.php/contact_person/index/{id}' role='button' target = '_blank'>联系人</a>
			<a class='btn btn-success btn-sm' href='http://<?php echo base_url(); ?>index.php/contact_record/index/{id}' role='button' target = '_blank'>联系记录</a>
		</td>
		</tr>
	{/clients}
	</tbody>
</table>

<script type="text/javascript">
	jQuery("#mytable").tablesorter();
</script>